package com.fsc.comadapoc1.utils
{
	import mx.controls.advancedDataGridClasses.AdvancedDataGridColumn;
	import mx.formatters.DateFormatter;
	
	import spark.components.gridClasses.GridColumn;

	public class DateFormatterUtil
	{
		public static function formatDateAdvancedDGColumn (item:Object, column:AdvancedDataGridColumn):String
		{
			var df:DateFormatter = new DateFormatter();
			df.formatString = "DD-MMM-YYYY";
			
			var value:Object = item[column.dataField];
			
			return df.format(value);
		}
		
		
		public static function formatDateDGColumn (item:Object, column:GridColumn):String
		{
			var df:DateFormatter = new DateFormatter();
			df.formatString = "DD-MMM-YYYY";
			
			var value:Object = item[column.dataField];
			
			return df.format(value);
		}
	}
}